<ng-include src="template.header">
</ng-include>
<ng-include src="template.sidebar">
</ng-include>
<div class="page-content sidebar-page clearfix">
    <div class="page-content-inner">
        <div id="page-header" class="clearfix">
            <div class="page-header">
                <h2>员工销售业绩</h2>
            </div>
        </div>
        <div class="row">
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="panel tile btlr0 bblr0" data-mh="payments">
                        <div class="panel-body">
                            <div class="col-lg-2 col-md-4 col-sm-4 col-xs-12">
                                <div class="btn-group" role="group">
                                    <button type="button" class="btn btn-primary" ng-model="periodRadio" uib-btn-radio="'week'">周</button>
                                    <button type="button" class="btn btn-primary" ng-model="periodRadio" uib-btn-radio="'month'">月</button>
                                </div>
                            </div>
                            <div class="col-lg-2 col-md-4 col-sm-4 col-xs-12">
                                <div class="input-group">
                                    <input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" />
                                    <span class="input-group-btn">
                                    <button type="button" class="btn btn-default" ng-click="open()"><i class="glyphicon glyphicon-calendar"></i></button>
                                  </span>
                                </div>
                            </div>
                            <div class="col-lg-2 col-md-4 col-sm-4 col-xs-12">
                                <button type="button" class="btn btn-success" ng-click="fetch()">获取</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row" ng-show="isShowList">
            	<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
                    <div class="panel tile btlr0 bblr0" data-mh="payments">
                		<div class="panel-heading">
                            <h4 class="panel-title"><i class="fa fa-comments"></i>销售业绩列表  周期{{period}}｜开始日{{start}} － 结束日{{end}}</h4>
                        </div>
                        <div class="panel-body">
                            <ul class="list-group recent-comments">
                                <li class="list-group-item clearfix comment-success" ng-repeat="(key, record) in kpis">
                                    <div class="avatar pull-left mr15">
                                        <img src="" alt="avatar" style="height:50px; width: 50px;">
                                    </div>
                                    <p>
                                        <span class="name strong">{{record.guider_code}} </span>
                                    </p>
                                    <div class="date text-muted small pull-left">
                                    	支付订单数：<span class="label label-success">{{record.paid_order_num}}</span>，周支付订单金额：<span class="label label-warning">{{record.paid_payment_amount}}</span>元人民币，购买人数：<span class="label label-info">{{record.paid_member_num}}</span>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
            	</div>
            </div>

        </div>
    </div>
</div>